<%@page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />

<form id="pagerForm" method="post" action="findDonator_Book">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="${numPerPage}" />
	<input type="hidden" name="orderField" value="${orderField}" />
	<input type="hidden" name="orderDirection" value="${orderDirection}" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);"
		action="findDonator_Book" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
					     <input type="hidden" name="functionNum" value="hxlbookad0004">
						<label>
							捐赠起始时间：
							<input type="text" id="donatorTimeStart" name="donatorTimeStart" class="date"
								 value="${donatorTimeStart}" />
						</label>
					</td>
					<td>
						<label>
							捐赠终止时间：
							<input type="text" id="donatorTimeEnd" name="donatorTimeEnd"
								value="${donatorTimeEnd}" class="date" />
						</label>
					</td>
					<td>
						<label>
							图书类型：
							<s:select theme="simple" headerKey="" headerValue="图书类型" list="#request.sysParaList" id="bookType" name="bookType"></s:select>
						</label>

					</td>
					<td>
						<label>
							捐赠人姓名：
							<input type="text" id="donatorName" name="donatorName" value="${donatorName}" />
						</label>
					</td>
					<td>
						<label>
							标准书号：
							<input type="text" id="isbn" name="isbn" value="${isbn}" />
						</label>
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">
									查看
								</button>
							</div>
						</div>
					</li>
					<li>
					<div class="buttonActive">
							<div class="buttonContent">
								<button id="reset7">
									重置
								</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
<div class="panelBar">
		<ul class="toolBar">
		</ul>
	</div>
	<table class="table" layoutH="138" targetType="navTab" asc="asc"
		desc="desc">
		<thead>
			<tr>
				<th width="150" align="center">
					标准书号
				</th>
				<th width="200" align="center">
					图书名称
				</th>
				<th width="130" align="center">
					图书类型
				</th>
				<th width="150" align="center">
					图书作者
				</th>
				<th width="150" align="center">
					捐赠时间
				</th>
				<th width="150" align="center">
					捐赠人编号
				</th>
				<th width="130" align="center">
					捐赠人姓名
				</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator id="book" value="bookList">
				<tr target="sid_user" rel="${book.bookId}">
					<td>
						${book.isbn}
					</td>
					<td>
						${book.bookName}
					</td>
					<td>
						${book.bookType}
					</td>
					<td>
						${book.author}
					</td>
					<td>
						${book.donatorTime}
					</td>
					<td>
						${book.donator.donatorId}
					</td>
					<td>
						${book.donator.donatorName}
					</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage"
				onchange="navTabPageBreak({numPerPage:this.value})">
				<option <s:if test="numPerPage==1">selected="selected"</s:if>
					value="1">
					1
				</option>
				<option <s:if test="numPerPage==5">selected="selected"</s:if>
					value="5">
					5
				</option>
				<option <s:if test="numPerPage==10">selected="selected"</s:if>
					value="10">
					10
				</option>
				<option <s:if test="numPerPage==15">selected="selected"</s:if>
					value="15">
					15
				</option>
				<option <s:if test="numPerPage==20">selected="selected"</s:if>
					value="20">
					20
				</option>
			</select>
			<span>条，共${totalCount}条</span>
		</div>

		<div class="pagination" targetType="${targetType}"
			totalCount="${totalCount}" numPerPage="${numPerPage}"
			pageNumShown="10" currentPage="${pageNum}">
		</div>
	</div>
</div>
<script type="text/javascript">
$(function($) {
	$("#reset7").click(function() {
		$('#donatorTimeStart').attr('value', "");
		$('#bookType').attr('value', "");
		$('#donatorTimeEnd').attr('value', "");
		$('#donatorName').attr('value', "");
		$('#isbn').attr('value', "");
	});
});
</script>
